<template>
  <div >
<!--     <el-container scroll="no" style="margin: 0;padding: 0;">
        <el-aside  style="height: 100vh;width:10vw;" ><el-menu
            style="height: 100%;"

            background-color="#545c64"
            text-color="#fff"
            active-text-color="#ffd04b"
            :default-active="activeIndex"
            router>
            <NavMenu :navMenus="menuData"></NavMenu>
        </el-menu></el-aside>

       <el-main style="height: 95vh; overflow-y:scroll"><router-view ></router-view></el-main>
     </el-container> -->
     <router-view ></router-view>
     <div style="height: 5vh;"></div>
  </div>

</template>

<script>
  import NavMenu from "./NavMenu.vue";
  import { getToken } from '@/request/api';
  export default {
    components: {
      NavMenu: NavMenu
    },
    data() {
      return {
        activeIndex: 'aa',
        menuData: [
          {
            entity: {
              id: 1,
              name: "production_load_material",
              // icon: "el-icon-message",
              alias: "上料控制台",
              value: { path: "/production_load_material" }
            },
          },
          {
            entity: {
              id: 2,
              name: "production_load_material_workbench",
              // icon: "el-icon-loading",
              alias: "上料执行台",
              value: { path: "/production_load_material_workbench" }
            },
          },
        ]
      };
    },
    mounted(){
      this.getToken();
    },
    methods:{
      getToken(){
          getToken({
              '': '',
              '': ''
          }).then(res => {
            localStorage.setItem('token', res.token);

          })
      }
    }
  };

</script>

<style>
    body {
        display: block;
        margin: 0;
    }
</style>
